home *** CD-ROM | disk | FTP | other *** search
/ Hardcore Visual Basic 5.0 (2nd Edition) / Hardcore Visual Basic 5.0 - Second Edition (1997)(Microsoft Press).iso / Source / Cpp4VB / WINTLB / WINMM.ODL < prev    next >
Text File  |  1996-02-27  |  37KB  |  802 lines

  1.  
  2. [
  3. uuid(5467404E-3A82-101B-8181-00AA003743D3),
  4. helpstring("Windows Multimedia Functions"),
  5. #ifdef WIN32
  6. dllname("WINMM.DLL")
  7. #else
  8. dllname("MMSYSTEM.DLL")
  9. #endif
  10. ]
  11. module Multimedia {
  12.  
  13.     /*
  14.     // ******* Multimedia messages *******
  15.     const UINT MM_JOY1MOVE        = 0x3A0;           // joystick
  16.     const UINT MM_JOY2MOVE        = 0x3A1;
  17.     const UINT MM_JOY1ZMOVE       = 0x3A2;
  18.     const UINT MM_JOY2ZMOVE       = 0x3A3;
  19.     const UINT MM_JOY1BUTTONDOWN  = 0x3B5;
  20.     const UINT MM_JOY2BUTTONDOWN  = 0x3B6;
  21.     const UINT MM_JOY1BUTTONUP    = 0x3B7;
  22.     const UINT MM_JOY2BUTTONUP    = 0x3B8;
  23.  
  24.     const UINT MM_MCINOTIFY       = 0x3B9;           // MCI
  25.  
  26.     const UINT MM_WOM_OPEN        = 0x3BB;           // waveform output
  27.     const UINT MM_WOM_CLOSE       = 0x3BC;
  28.     const UINT MM_WOM_DONE        = 0x3BD;
  29.  
  30.     const UINT MM_WIM_OPEN        = 0x3BE;           // waveform input
  31.     const UINT MM_WIM_CLOSE       = 0x3BF;
  32.     const UINT MM_WIM_DATA        = 0x3C0;
  33.  
  34.     const UINT MM_MIM_OPEN        = 0x3C1;           // MIDI input
  35.     const UINT MM_MIM_CLOSE       = 0x3C2;
  36.     const UINT MM_MIM_DATA        = 0x3C3;
  37.     const UINT MM_MIM_LONGDATA    = 0x3C4;
  38.     const UINT MM_MIM_ERROR       = 0x3C5;
  39.     const UINT MM_MIM_LONGERROR   = 0x3C6;
  40.  
  41.     const UINT MM_MOM_OPEN        = 0x3C7;           // MIDI output
  42.     const UINT MM_MOM_CLOSE       = 0x3C8;
  43.     const UINT MM_MOM_DONE        = 0x3C9;
  44.  
  45.  
  46.     // ****** String resource number bases (internal use) *****
  47.  
  48.     const int MMSYSERR_BASE         = 0;
  49.     const int WAVERR_BASE           = 32;
  50.     const int MIDIERR_BASE          = 64;
  51.     const int TIMERR_BASE           = 96;
  52.     const int JOYERR_BASE           = 160;
  53.     const int MCIERR_BASE           = 256;
  54.  
  55.     const int MCI_STRING_OFFSET     = 512;
  56.     const int MCI_VD_OFFSET         = 1024;
  57.     const int MCI_CD_OFFSET         = 1088;
  58.     const int MCI_WAVE_OFFSET       = 1152;
  59.     const int MCI_SEQ_OFFSET        = 1216;
  60.  
  61.     // ******* General error return values ********
  62.  
  63.     // general error return values
  64.     const int MMSYSERR_NOERROR      = 0;                    // no error
  65.     //define MMSYSERR_ERROR       (MMSYSERR_BASE + 1)  // unspecified error
  66.     //define MMSYSERR_BADDEVICEID  (MMSYSERR_BASE + 2)  // device ID out of range
  67.     //define MMSYSERR_NOTENABLED   (MMSYSERR_BASE + 3)  // driver failed enable
  68.     //define MMSYSERR_ALLOCATED   (MMSYSERR_BASE + 4)  // device already allocated
  69.     //define MMSYSERR_INVALHANDLE  (MMSYSERR_BASE + 5)  // device handle is invalid
  70.     //define MMSYSERR_NODRIVER    (MMSYSERR_BASE + 6)  // no device driver present
  71.     //define MMSYSERR_NOMEM       (MMSYSERR_BASE + 7)  // memory allocation error
  72.     //define MMSYSERR_NOTSUPPORTED (MMSYSERR_BASE + 8)  // function isn't supported
  73.     //define MMSYSERR_BADERRNUM   (MMSYSERR_BASE + 9)  // error value out of range
  74.     //define MMSYSERR_INVALFLAG   (MMSYSERR_BASE + 10) // invalid flag passed
  75.     //define MMSYSERR_INVALPARAM   (MMSYSERR_BASE + 11) // invalid parameter passed
  76.     //define MMSYSERR_LASTERROR   (MMSYSERR_BASE + 11) // last error in range
  77.     */
  78.  
  79.     // ******** Omit Installable driver support *****
  80.  
  81.     // ******* Omit Driver callback support ******
  82.  
  83.     // ******* Manufacturer and product IDs *****
  84.  
  85.     /*
  86.     // Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS,
  87.     // MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures.
  88.  
  89.     // manufacturer IDs
  90.     const int MM_MICROSOFT           = 1;       // Microsoft Corp.
  91.  
  92.     // product IDs
  93.     const int MM_MIDI_MAPPER         = 1;       // MIDI Mapper
  94.     const int MM_WAVE_MAPPER         = 2;       // Wave Mapper
  95.  
  96.     const int MM_SNDBLST_MIDIOUT     = 3;       // Sound Blaster MIDI output port
  97.     const int MM_SNDBLST_MIDIIN      = 4;       // Sound Blaster MIDI input port
  98.     const int MM_SNDBLST_SYNTH       = 5;       // Sound Blaster internal synthesizer
  99.     const int MM_SNDBLST_WAVEOUT     = 6;       // Sound Blaster waveform output
  100.     const int MM_SNDBLST_WAVEIN      = 7;       // Sound Blaster waveform input
  101.  
  102.     const int MM_ADLIB               = 9 ;      // Ad Lib-compatible synthesizer
  103.  
  104.     const int MM_MPU401_MIDIOUT      = 10;      // MPU401-compatible MIDI output port
  105.     const int MM_MPU401_MIDIIN       = 11;      // MPU401-compatible MIDI input port
  106.  
  107.     //define MM_PC_JOYSTICK         12      // Joystick adapter
  108.     */
  109.  
  110.     // ****** General MMSYSTEM support *******
  111.  
  112.     /*
  113.     WORD WINAPI mmsystemGetVersion(void);
  114.     */
  115.  
  116.  
  117.     // ****** Sound support ******
  118.  
  119.     [
  120.     #ifdef WIN32
  121.     usesgetlasterror,
  122.     entry("sndPlaySoundA"),
  123.     #else
  124.     entry("sndPlaySound"),
  125.     #endif
  126.     helpstring("Plays a sound pointer according to flags"),
  127.     ]
  128.     BOOL WINAPI sndPlaySound([in] LPSTR lpszSound, [in] UINT uFlags);
  129.  
  130.     [
  131.     #ifdef WIN32
  132.     usesgetlasterror,
  133.     entry("sndPlaySoundA"),
  134.     #else
  135.     entry("sndPlaySound"),
  136.     #endif
  137.     helpstring("Plays a sound string according to flags"),
  138.     ]
  139.     BOOL WINAPI sndPlaySoundAsBytes([in] BYTE FAR * lpbSoundName, [in] UINT uFlags);
  140.  
  141.     [
  142.     #ifdef WIN32
  143.     usesgetlasterror,
  144.     entry("sndPlaySoundA"),
  145.     #else
  146.     entry("sndPlaySound"),
  147.     #endif
  148.     helpstring("Plays a sound pointer according to flags"),
  149.     ]
  150.     BOOL WINAPI sndPlaySoundAsLp([in] DWORD dwSound, [in] UINT uFlags);
  151.  
  152.     // flag values for wFlags parameter
  153.     [ helpstring("sndPlaySound: Play synchronously (default)") ]
  154.     const UINT SND_SYNC          = 0x0000;
  155.     [ helpstring("sndPlaySound: Play asynchronously") ]
  156.     const UINT SND_ASYNC         = 0x0001;
  157.     [ helpstring("sndPlaySound: Don't use default sound") ]
  158.     const UINT SND_NODEFAULT     = 0x0002;
  159.     [ helpstring("sndPlaySound: String parameter points to sound in memory") ]
  160.     const UINT SND_MEMORY        = 0x0004;
  161.     [ helpstring("sndPlaySound: Loop the sound until next sndPlaySound") ]
  162.     const UINT SND_LOOP          = 0x0008;
  163.     [ helpstring("sndPlaySound: Don't stop any currently playing sound") ]
  164.     const UINT SND_NOSTOP        = 0x0010;
  165.  
  166.     // ****** Waveform audio support ******
  167.  
  168.     /*
  169.     // waveform audio error return values
  170.     //define WAVERR_BADFORMAT     (WAVERR_BASE + 0)    // unsupported wave format
  171.     //define WAVERR_STILLPLAYING   (WAVERR_BASE + 1)    // still something playing
  172.     //define WAVERR_UNPREPARED    (WAVERR_BASE + 2)    // header not prepared
  173.     //define WAVERR_SYNC          (WAVERR_BASE + 3)    // device is synchronous
  174.     //define WAVERR_LASTERROR     (WAVERR_BASE + 3)    // last error in range
  175.  
  176.     // waveform audio data types
  177.     DECLARE_HANDLE(HWAVE);
  178.     DECLARE_HANDLE(HWAVEIN);
  179.     DECLARE_HANDLE(HWAVEOUT);
  180.     typedef HWAVEIN FAR *LPHWAVEIN;
  181.     typedef HWAVEOUT FAR *LPHWAVEOUT;
  182.     typedef DRVCALLBACK WAVECALLBACK;
  183.     typedef WAVECALLBACK FAR *LPWAVECALLBACK;
  184.  
  185.     // Omit wave callback messages
  186.  
  187.     // device ID for wave device mapper
  188.     //define WAVE_MAPPER    (-1)
  189.  
  190.     // flags for dwFlags parameter in waveOutOpen() and waveInOpen()
  191.     //define  WAVE_FORMAT_QUERY    0x0001
  192.     //define  WAVE_ALLOWSYNC       0x0002
  193.  
  194.     // wave data block header
  195.     typedef struct wavehdr_tag {
  196.         LPSTR       lpData;                 // pointer to locked data buffer
  197.         DWORD       dwBufferLength;         // length of data buffer
  198.         DWORD       dwBytesRecorded;        // used for input only
  199.         DWORD       dwUser;                 // for client's use
  200.         DWORD       dwFlags;                // assorted flags (see defines)
  201.         DWORD       dwLoops;                // loop control counter
  202.         struct wavehdr_tag far *lpNext;     // reserved for driver
  203.         DWORD       reserved;               // reserved for driver
  204.     } WAVEHDR;
  205.     typedef WAVEHDR       *PWAVEHDR;
  206.     typedef WAVEHDR NEAR *NPWAVEHDR;
  207.     typedef WAVEHDR FAR  *LPWAVEHDR;
  208.  
  209.     // flags for dwFlags field of WAVEHDR
  210.     //define WHDR_DONE      0x00000001  // done bit
  211.     //define WHDR_PREPARED  0x00000002  // set if this header has been prepared
  212.     //define WHDR_BEGINLOOP 0x00000004  // loop start block
  213.     //define WHDR_ENDLOOP   0x00000008  // loop end block
  214.     //define WHDR_INQUEUE   0x00000010  // reserved for driver
  215.  
  216.     // waveform output device capabilities structure
  217.     typedef struct waveoutcaps_tag {
  218.         UINT    wMid;                  // manufacturer ID
  219.         UINT    wPid;                  // product ID
  220.         VERSION vDriverVersion;        // version of the driver
  221.         char    szPname[MAXPNAMELEN];  // product name (NULL terminated string)
  222.         DWORD   dwFormats;             // formats supported
  223.         UINT    wChannels;             // number of sources supported
  224.         DWORD   dwSupport;             // functionality supported by driver
  225.     } WAVEOUTCAPS;
  226.     typedef WAVEOUTCAPS       *PWAVEOUTCAPS;
  227.     typedef WAVEOUTCAPS NEAR *NPWAVEOUTCAPS;
  228.     typedef WAVEOUTCAPS FAR  *LPWAVEOUTCAPS;
  229.  
  230.     // flags for dwSupport field of WAVEOUTCAPS
  231.     //define WAVECAPS_PITCH         0x0001   // supports pitch control
  232.     //define WAVECAPS_PLAYBACKRATE  0x0002   // supports playback rate control
  233.     //define WAVECAPS_VOLUME        0x0004   // supports volume control
  234.     //define WAVECAPS_LRVOLUME      0x0008   // separate left-right volume control
  235.     //define WAVECAPS_SYNC          0x0010
  236.  
  237.     // waveform input device capabilities structure
  238.     typedef struct waveincaps_tag {
  239.         UINT    wMid;                    // manufacturer ID
  240.         UINT    wPid;                    // product ID
  241.         VERSION vDriverVersion;          // version of the driver
  242.         char    szPname[MAXPNAMELEN];    // product name (NULL terminated string)
  243.         DWORD   dwFormats;               // formats supported
  244.         UINT    wChannels;               // number of channels supported
  245.     } WAVEINCAPS;
  246.     typedef WAVEINCAPS       *PWAVEINCAPS;
  247.     typedef WAVEINCAPS NEAR *NPWAVEINCAPS;
  248.     typedef WAVEINCAPS FAR  *LPWAVEINCAPS;
  249.  
  250.     // defines for dwFormat field of WAVEINCAPS and WAVEOUTCAPS
  251.     //define WAVE_INVALIDFORMAT    0x00000000       // invalid format
  252.     //define WAVE_FORMAT_1M08      0x00000001       // 11.025 kHz, Mono,   8-bit
  253.     //define WAVE_FORMAT_1S08      0x00000002       // 11.025 kHz, Stereo, 8-bit
  254.     //define WAVE_FORMAT_1M16      0x00000004       // 11.025 kHz, Mono,   16-bit
  255.     //define WAVE_FORMAT_1S16      0x00000008       // 11.025 kHz, Stereo, 16-bit
  256.     //define WAVE_FORMAT_2M08      0x00000010       // 22.05  kHz, Mono,   8-bit
  257.     //define WAVE_FORMAT_2S08      0x00000020       // 22.05  kHz, Stereo, 8-bit
  258.     //define WAVE_FORMAT_2M16      0x00000040       // 22.05  kHz, Mono,   16-bit
  259.     //define WAVE_FORMAT_2S16      0x00000080       // 22.05  kHz, Stereo, 16-bit
  260.     //define WAVE_FORMAT_4M08      0x00000100       // 44.1   kHz, Mono,   8-bit
  261.     //define WAVE_FORMAT_4S08      0x00000200       // 44.1   kHz, Stereo, 8-bit
  262.     //define WAVE_FORMAT_4M16      0x00000400       // 44.1   kHz, Mono,   16-bit
  263.     //define WAVE_FORMAT_4S16      0x00000800       // 44.1   kHz, Stereo, 16-bit
  264.  
  265.     // general waveform format structure (information common to all formats)
  266.     typedef struct waveformat_tag {
  267.         WORD    wFormatTag;        // format type
  268.         WORD    nChannels;         // number of channels (i.e. mono, stereo, etc.)
  269.         DWORD   nSamplesPerSec;    // sample rate
  270.         DWORD   nAvgBytesPerSec;   // for buffer estimation
  271.         WORD    nBlockAlign;       // block size of data
  272.     } WAVEFORMAT;
  273.     typedef WAVEFORMAT       *PWAVEFORMAT;
  274.     typedef WAVEFORMAT NEAR *NPWAVEFORMAT;
  275.     typedef WAVEFORMAT FAR  *LPWAVEFORMAT;
  276.  
  277.     // flags for wFormatTag field of WAVEFORMAT
  278.     //define WAVE_FORMAT_PCM    1
  279.  
  280.     // specific waveform format structure for PCM data
  281.     typedef struct pcmwaveformat_tag {
  282.         WAVEFORMAT  wf;
  283.         WORD        wBitsPerSample;
  284.     } PCMWAVEFORMAT;
  285.     typedef PCMWAVEFORMAT       *PPCMWAVEFORMAT;
  286.     typedef PCMWAVEFORMAT NEAR *NPPCMWAVEFORMAT;
  287.     typedef PCMWAVEFORMAT FAR  *LPPCMWAVEFORMAT;
  288.  
  289.     // waveform audio function prototypes
  290.     UINT WINAPI waveOutGetNumDevs(void);
  291.     UINT WINAPI waveOutGetDevCaps(UINT uDeviceID, WAVEOUTCAPS FAR* lpCaps,
  292.         UINT uSize);
  293.     UINT WINAPI waveOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
  294.     UINT WINAPI waveOutSetVolume(UINT uDeviceID, DWORD dwVolume);
  295.     UINT WINAPI waveOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  296.     UINT WINAPI waveOutOpen(HWAVEOUT FAR* lphWaveOut, UINT uDeviceID,
  297.         const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  298.     UINT WINAPI waveOutClose(HWAVEOUT hWaveOut);
  299.     UINT WINAPI waveOutPrepareHeader(HWAVEOUT hWaveOut,
  300.          WAVEHDR FAR* lpWaveOutHdr, UINT uSize);
  301.     UINT WINAPI waveOutUnprepareHeader(HWAVEOUT hWaveOut,
  302.         WAVEHDR FAR* lpWaveOutHdr, UINT uSize);
  303.     UINT WINAPI waveOutWrite(HWAVEOUT hWaveOut, WAVEHDR FAR* lpWaveOutHdr,
  304.         UINT uSize);
  305.     UINT WINAPI waveOutPause(HWAVEOUT hWaveOut);
  306.     UINT WINAPI waveOutRestart(HWAVEOUT hWaveOut);
  307.     UINT WINAPI waveOutReset(HWAVEOUT hWaveOut);
  308.     UINT WINAPI waveOutBreakLoop(HWAVEOUT hWaveOut);
  309.     UINT WINAPI waveOutGetPosition(HWAVEOUT hWaveOut, MMTIME FAR* lpInfo,
  310.         UINT uSize);
  311.     UINT WINAPI waveOutGetPitch(HWAVEOUT hWaveOut, DWORD FAR* lpdwPitch);
  312.     UINT WINAPI waveOutSetPitch(HWAVEOUT hWaveOut, DWORD dwPitch);
  313.     UINT WINAPI waveOutGetPlaybackRate(HWAVEOUT hWaveOut, DWORD FAR* lpdwRate);
  314.     UINT WINAPI waveOutSetPlaybackRate(HWAVEOUT hWaveOut, DWORD dwRate);
  315.     UINT WINAPI waveOutGetID(HWAVEOUT hWaveOut, UINT FAR* lpuDeviceID);
  316.  
  317.     DWORD WINAPI waveOutMessage(HWAVEOUT hWaveOut, UINT uMessage, DWORD dw1, DWORD dw2);
  318.  
  319.     UINT WINAPI waveInGetNumDevs(void);
  320.     UINT WINAPI waveInGetDevCaps(UINT uDeviceID, WAVEINCAPS FAR* lpCaps,
  321.         UINT uSize);
  322.     UINT WINAPI waveInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  323.     UINT WINAPI waveInOpen(HWAVEIN FAR* lphWaveIn, UINT uDeviceID,
  324.         const WAVEFORMAT FAR* lpFormat, DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  325.     UINT WINAPI waveInClose(HWAVEIN hWaveIn);
  326.     UINT WINAPI waveInPrepareHeader(HWAVEIN hWaveIn,
  327.         WAVEHDR FAR* lpWaveInHdr, UINT uSize);
  328.     UINT WINAPI waveInUnprepareHeader(HWAVEIN hWaveIn,
  329.         WAVEHDR FAR* lpWaveInHdr, UINT uSize);
  330.     UINT WINAPI waveInAddBuffer(HWAVEIN hWaveIn,
  331.         WAVEHDR FAR* lpWaveInHdr, UINT uSize);
  332.     UINT WINAPI waveInStart(HWAVEIN hWaveIn);
  333.     UINT WINAPI waveInStop(HWAVEIN hWaveIn);
  334.     UINT WINAPI waveInReset(HWAVEIN hWaveIn);
  335.     UINT WINAPI waveInGetPosition(HWAVEIN hWaveIn, MMTIME FAR* lpInfo,
  336.         UINT uSize);
  337.     UINT WINAPI waveInGetID(HWAVEIN hWaveIn, UINT FAR* lpuDeviceID);
  338.  
  339.     DWORD WINAPI waveInMessage(HWAVEIN hWaveIn, UINT uMessage, DWORD dw1, DWORD dw2);
  340.     */
  341.  
  342.  
  343.     // ****** MIDI audio support *******
  344.  
  345.     /*
  346.     // MIDI error return values
  347.     //define MIDIERR_UNPREPARED   (MIDIERR_BASE + 0)   // header not prepared
  348.     //define MIDIERR_STILLPLAYING  (MIDIERR_BASE + 1)   // still something playing
  349.     //define MIDIERR_NOMAP        (MIDIERR_BASE + 2)   // no current map
  350.     //define MIDIERR_NOTREADY     (MIDIERR_BASE + 3)   // hardware is still busy
  351.     //define MIDIERR_NODEVICE     (MIDIERR_BASE + 4)   // port no longer connected
  352.     //define MIDIERR_INVALIDSETUP  (MIDIERR_BASE + 5)   // invalid setup
  353.     //define MIDIERR_LASTERROR    (MIDIERR_BASE + 5)   // last error in range
  354.  
  355.     // MIDI audio data types
  356.     DECLARE_HANDLE(HMIDI);
  357.     DECLARE_HANDLE(HMIDIIN);
  358.     DECLARE_HANDLE(HMIDIOUT);
  359.     typedef HMIDIIN FAR *LPHMIDIIN;
  360.     typedef HMIDIOUT FAR *LPHMIDIOUT;
  361.     typedef DRVCALLBACK MIDICALLBACK;
  362.     typedef MIDICALLBACK FAR *LPMIDICALLBACK;
  363.     //define MIDIPATCHSIZE  128
  364.     typedef WORD PATCHARRAY[MIDIPATCHSIZE];
  365.     typedef WORD FAR *LPPATCHARRAY;
  366.     typedef WORD KEYARRAY[MIDIPATCHSIZE];
  367.     typedef WORD FAR *LPKEYARRAY;
  368.  
  369.     // MIDI callback messages
  370.     //define MIM_OPEN       MM_MIM_OPEN
  371.     //define MIM_CLOSE      MM_MIM_CLOSE
  372.     //define MIM_DATA       MM_MIM_DATA
  373.     //define MIM_LONGDATA   MM_MIM_LONGDATA
  374.     //define MIM_ERROR      MM_MIM_ERROR
  375.     //define MIM_LONGERROR  MM_MIM_LONGERROR
  376.     //define MOM_OPEN       MM_MOM_OPEN
  377.     //define MOM_CLOSE      MM_MOM_CLOSE
  378.     //define MOM_DONE       MM_MOM_DONE
  379.  
  380.     // device ID for MIDI mapper
  381.     //define MIDIMAPPER    (-1)
  382.     //define MIDI_MAPPER    (-1)
  383.  
  384.     // flags for wFlags parm of midiOutCachePatches(), midiOutCacheDrumPatches()
  385.     //define MIDI_CACHE_ALL     1
  386.     //define MIDI_CACHE_BESTFIT 2
  387.     //define MIDI_CACHE_QUERY   3
  388.     //define MIDI_UNCACHE       4
  389.  
  390.     // MIDI output device capabilities structure
  391.     typedef struct midioutcaps_tag {
  392.         UINT    wMid;                  // manufacturer ID
  393.         UINT    wPid;                  // product ID
  394.         VERSION vDriverVersion;        // version of the driver
  395.         char    szPname[MAXPNAMELEN];  // product name (NULL terminated string)
  396.         UINT    wTechnology;           // type of device
  397.         UINT    wVoices;               // # of voices (internal synth only)
  398.         UINT    wNotes;                // max # of notes (internal synth only)
  399.         UINT    wChannelMask;          // channels used (internal synth only)
  400.         DWORD   dwSupport;             // functionality supported by driver
  401.     } MIDIOUTCAPS;
  402.     typedef MIDIOUTCAPS       *PMIDIOUTCAPS;
  403.     typedef MIDIOUTCAPS NEAR *NPMIDIOUTCAPS;
  404.     typedef MIDIOUTCAPS FAR  *LPMIDIOUTCAPS;
  405.  
  406.     // flags for wTechnology field of MIDIOUTCAPS structure
  407.     //define MOD_MIDIPORT   1  // output port
  408.     //define MOD_SYNTH      2  // generic internal synth
  409.     //define MOD_SQSYNTH    3  // square wave internal synth
  410.     //define MOD_FMSYNTH    4  // FM internal synth
  411.     //define MOD_MAPPER     5  // MIDI mapper
  412.  
  413.     // flags for dwSupport field of MIDIOUTCAPS structure
  414.     //define MIDICAPS_VOLUME         0x0001  // supports volume control
  415.     //define MIDICAPS_LRVOLUME       0x0002  // separate left-right volume control
  416.     //define MIDICAPS_CACHE          0x0004
  417.  
  418.     // MIDI output device capabilities structure
  419.     typedef struct midiincaps_tag {
  420.         UINT    wMid;                  // manufacturer ID
  421.         UINT    wPid;                  // product ID
  422.         VERSION vDriverVersion;        // version of the driver
  423.         char    szPname[MAXPNAMELEN];  // product name (NULL terminated string)
  424.     } MIDIINCAPS;
  425.     typedef MIDIINCAPS      *PMIDIINCAPS;
  426.     typedef MIDIINCAPS NEAR *NPMIDIINCAPS;
  427.     typedef MIDIINCAPS FAR  *LPMIDIINCAPS;
  428.  
  429.     // MIDI data block header
  430.     typedef struct midihdr_tag {
  431.         LPSTR       lpData;               // pointer to locked data block
  432.         DWORD       dwBufferLength;       // length of data in data block
  433.         DWORD       dwBytesRecorded;      // used for input only
  434.         DWORD       dwUser;               // for client's use
  435.         DWORD       dwFlags;              // assorted flags (see defines)
  436.         struct midihdr_tag far *lpNext;   // reserved for driver
  437.         DWORD       reserved;             // reserved for driver
  438.     } MIDIHDR;
  439.     typedef MIDIHDR       *PMIDIHDR;
  440.     typedef MIDIHDR NEAR *NPMIDIHDR;
  441.     typedef MIDIHDR FAR  *LPMIDIHDR;
  442.  
  443.     // flags for dwFlags field of MIDIHDR structure
  444.     //define MHDR_DONE      0x00000001       // done bit
  445.     //define MHDR_PREPARED  0x00000002       // set if header prepared
  446.     //define MHDR_INQUEUE   0x00000004       // reserved for driver
  447.  
  448.     // MIDI function prototypes
  449.     UINT WINAPI midiOutGetNumDevs(void);
  450.     UINT WINAPI midiOutGetDevCaps(UINT uDeviceID,
  451.         MIDIOUTCAPS FAR* lpCaps, UINT uSize);
  452.     UINT WINAPI midiOutGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
  453.     UINT WINAPI midiOutSetVolume(UINT uDeviceID, DWORD dwVolume);
  454.     UINT WINAPI midiOutGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  455.     UINT WINAPI midiOutOpen(HMIDIOUT FAR* lphMidiOut, UINT uDeviceID,
  456.         DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  457.     UINT WINAPI midiOutClose(HMIDIOUT hMidiOut);
  458.     UINT WINAPI midiOutPrepareHeader(HMIDIOUT hMidiOut,
  459.         MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
  460.     UINT WINAPI midiOutUnprepareHeader(HMIDIOUT hMidiOut,
  461.         MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
  462.     UINT WINAPI midiOutShortMsg(HMIDIOUT hMidiOut, DWORD dwMsg);
  463.     UINT WINAPI midiOutLongMsg(HMIDIOUT hMidiOut,
  464.         MIDIHDR FAR* lpMidiOutHdr, UINT uSize);
  465.     UINT WINAPI midiOutReset(HMIDIOUT hMidiOut);
  466.     UINT WINAPI midiOutCachePatches(HMIDIOUT hMidiOut,
  467.         UINT uBank, WORD FAR* lpwPatchArray, UINT uFlags);
  468.     UINT WINAPI midiOutCacheDrumPatches(HMIDIOUT hMidiOut,
  469.         UINT uPatch, WORD FAR* lpwKeyArray, UINT uFlags);
  470.     UINT WINAPI midiOutGetID(HMIDIOUT hMidiOut, UINT FAR* lpuDeviceID);
  471.  
  472.     DWORD WINAPI midiOutMessage(HMIDIOUT hMidiOut, UINT uMessage, DWORD dw1, DWORD dw2);
  473.  
  474.     UINT WINAPI midiInGetNumDevs(void);
  475.     UINT WINAPI midiInGetDevCaps(UINT uDeviceID,
  476.         LPMIDIINCAPS lpCaps, UINT uSize);
  477.     UINT WINAPI midiInGetErrorText(UINT uError, LPSTR lpText, UINT uSize);
  478.     UINT WINAPI midiInOpen(HMIDIIN FAR* lphMidiIn, UINT uDeviceID,
  479.         DWORD dwCallback, DWORD dwInstance, DWORD dwFlags);
  480.     UINT WINAPI midiInClose(HMIDIIN hMidiIn);
  481.     UINT WINAPI midiInPrepareHeader(HMIDIIN hMidiIn,
  482.         MIDIHDR FAR* lpMidiInHdr, UINT uSize);
  483.     UINT WINAPI midiInUnprepareHeader(HMIDIIN hMidiIn,
  484.         MIDIHDR FAR* lpMidiInHdr, UINT uSize);
  485.     UINT WINAPI midiInAddBuffer(HMIDIIN hMidiIn,
  486.         MIDIHDR FAR* lpMidiInHdr, UINT uSize);
  487.     UINT WINAPI midiInStart(HMIDIIN hMidiIn);
  488.     UINT WINAPI midiInStop(HMIDIIN hMidiIn);
  489.     UINT WINAPI midiInReset(HMIDIIN hMidiIn);
  490.     UINT WINAPI midiInGetID(HMIDIIN hMidiIn, UINT FAR* lpuDeviceID);
  491.  
  492.     DWORD WINAPI midiInMessage(HMIDIIN hMidiIn, UINT uMessage, DWORD dw1, DWORD dw2);
  493.     */
  494.  
  495.     // ****** Auxiliary audio support ******
  496.  
  497.     /*
  498.     // device ID for aux device mapper
  499.     //define AUX_MAPPER    (-1)
  500.  
  501.     // Auxiliary audio device capabilities structure
  502.     typedef struct auxcaps_tag {
  503.         UINT    wMid;                  // manufacturer ID
  504.         UINT    wPid;                  // product ID
  505.         VERSION vDriverVersion;        // version of the driver
  506.         char    szPname[MAXPNAMELEN];  // product name (NULL terminated string)
  507.         UINT    wTechnology;           // type of device
  508.         DWORD   dwSupport;             // functionality supported by driver
  509.     } AUXCAPS;
  510.     typedef AUXCAPS       *PAUXCAPS;
  511.     typedef AUXCAPS NEAR *NPAUXCAPS;
  512.     typedef AUXCAPS FAR  *LPAUXCAPS;
  513.  
  514.     // flags for wTechnology field in AUXCAPS structure
  515.     //define AUXCAPS_CDAUDIO    1      // audio from internal CD-ROM drive
  516.     //define AUXCAPS_AUXIN     2       // audio from auxiliary input jacks
  517.  
  518.     // flags for dwSupport field in AUXCAPS structure
  519.     //define AUXCAPS_VOLUME         0x0001  // supports volume control
  520.     //define AUXCAPS_LRVOLUME       0x0002  // separate left-right volume control
  521.  
  522.     // auxiliary audio function prototypes
  523.     UINT WINAPI auxGetNumDevs(void);
  524.     UINT WINAPI auxGetDevCaps(UINT uDeviceID, AUXCAPS FAR* lpCaps, UINT uSize);
  525.     UINT WINAPI auxSetVolume(UINT uDeviceID, DWORD dwVolume);
  526.     UINT WINAPI auxGetVolume(UINT uDeviceID, DWORD FAR* lpdwVolume);
  527.  
  528.     DWORD WINAPI auxOutMessage(UINT uDeviceID, UINT uMessage, DWORD dw1, DWORD dw2);
  529.     */
  530.  
  531.  
  532.     // ********** Timer support ********
  533.  
  534.     /* Omit all except timeGetTime
  535.     */
  536.  
  537.     [
  538.     usesgetlasterror,
  539.     entry("timeGetTime"),
  540.     helpstring("Gets the time in milliseconds"),
  541.     ]
  542.     DWORD WINAPI timeGetTime();
  543.  
  544.     // ****** Joystick support ******
  545.  
  546.     /*
  547.     // joystick error return values
  548.     //define JOYERR_NOERROR       (0)                  // no error
  549.     //define JOYERR_PARMS         (JOYERR_BASE+5)      // bad parameters
  550.     //define JOYERR_NOCANDO       (JOYERR_BASE+6)      // request not completed
  551.     //define JOYERR_UNPLUGGED     (JOYERR_BASE+7)      // joystick is unplugged
  552.  
  553.     // constants used with JOYINFO structure and MM_JOY* messages
  554.     //define JOY_BUTTON1        0x0001
  555.     //define JOY_BUTTON2        0x0002
  556.     //define JOY_BUTTON3        0x0004
  557.     //define JOY_BUTTON4        0x0008
  558.     //define JOY_BUTTON1CHG     0x0100
  559.     //define JOY_BUTTON2CHG     0x0200
  560.     //define JOY_BUTTON3CHG     0x0400
  561.     //define JOY_BUTTON4CHG     0x0800
  562.  
  563.     // joystick ID constants
  564.     //define JOYSTICKID1        0
  565.     //define JOYSTICKID2        1
  566.  
  567.     // joystick device capabilities data structure
  568.     typedef struct joycaps_tag {
  569.         UINT wMid;                  // manufacturer ID
  570.         UINT wPid;                  // product ID
  571.         char szPname[MAXPNAMELEN];  // product name (NULL terminated string)
  572.         UINT wXmin;                 // minimum x position value
  573.         UINT wXmax;                 // maximum x position value
  574.         UINT wYmin;                 // minimum y position value
  575.         UINT wYmax;                 // maximum y position value
  576.         UINT wZmin;                 // minimum z position value
  577.         UINT wZmax;                 // maximum z position value
  578.         UINT wNumButtons;           // number of buttons
  579.         UINT wPeriodMin;            // minimum message period when captured
  580.         UINT wPeriodMax;            // maximum message period when captured
  581.         } JOYCAPS;
  582.     typedef JOYCAPS       *PJOYCAPS;
  583.     typedef JOYCAPS NEAR *NPJOYCAPS;
  584.     typedef JOYCAPS FAR  *LPJOYCAPS;
  585.  
  586.     // joystick information data structure
  587.     typedef struct joyinfo_tag {
  588.         UINT wXpos;                 // x position
  589.         UINT wYpos;                 // y position
  590.         UINT wZpos;                 // z position
  591.         UINT wButtons;              // button states
  592.         } JOYINFO;
  593.     typedef JOYINFO       *PJOYINFO;
  594.     typedef JOYINFO NEAR *NPJOYINFO;
  595.     typedef JOYINFO FAR  *LPJOYINFO;
  596.  
  597.     // joystick function prototypes
  598.     UINT WINAPI joyGetDevCaps(UINT uJoyID, JOYCAPS FAR* lpCaps, UINT uSize);
  599.     UINT WINAPI joyGetNumDevs(void);
  600.     UINT WINAPI joyGetPos(UINT uJoyID, JOYINFO FAR* lpInfo);
  601.     UINT WINAPI joyGetThreshold(UINT uJoyID, UINT FAR* lpuThreshold);
  602.     UINT WINAPI joyReleaseCapture(UINT uJoyID);
  603.     UINT WINAPI joySetCapture([in] HWND hwnd hwnd, UINT uJoyID, UINT uPeriod,
  604.         BOOL bChanged);
  605.     UINT WINAPI joySetThreshold(UINT uJoyID, UINT uThreshold);
  606.     */
  607.  
  608.  
  609.     // ****** Multimedia File I/O support *******
  610.  
  611.     /*
  612.     // MMIO error return values
  613.     //define MMIOERR_BASE           256
  614.     //define MMIOERR_FILENOTFOUND   (MMIOERR_BASE + 1)  // file not found
  615.     //define MMIOERR_OUTOFMEMORY    (MMIOERR_BASE + 2)  // out of memory
  616.     //define MMIOERR_CANNOTOPEN     (MMIOERR_BASE + 3)  // cannot open
  617.     //define MMIOERR_CANNOTCLOSE    (MMIOERR_BASE + 4)  // cannot close
  618.     //define MMIOERR_CANNOTREAD     (MMIOERR_BASE + 5)  // cannot read
  619.     //define MMIOERR_CANNOTWRITE    (MMIOERR_BASE + 6)  // cannot write
  620.     //define MMIOERR_CANNOTSEEK     (MMIOERR_BASE + 7)  // cannot seek
  621.     //define MMIOERR_CANNOTEXPAND   (MMIOERR_BASE + 8)  // cannot expand file
  622.     //define MMIOERR_CHUNKNOTFOUND  (MMIOERR_BASE + 9)  // chunk not found
  623.     //define MMIOERR_UNBUFFERED     (MMIOERR_BASE + 10) // file is unbuffered
  624.  
  625.     // MMIO constants
  626.     //define CFSEPCHAR      '+'             // compound file name separator char.
  627.  
  628.     // MMIO data types
  629.     typedef DWORD           FOURCC;         // a four character code
  630.     typedef char _huge *    HPSTR;          // a huge version of LPSTR
  631.     DECLARE_HANDLE(HMMIO);                  // a handle to an open file
  632.     typedef LRESULT (CALLBACK MMIOPROC)(LPSTR lpmmioinfo, UINT uMessage,
  633.                 LPARAM lParam1, LPARAM lParam2);
  634.     typedef MMIOPROC FAR *LPMMIOPROC;
  635.  
  636.     // general MMIO information data structure
  637.     typedef struct _MMIOINFO
  638.     {
  639.             // general fields
  640.             DWORD           dwFlags;        // general status flags
  641.             FOURCC          fccIOProc;      // pointer to I/O procedure
  642.             LPMMIOPROC      pIOProc;        // pointer to I/O procedure
  643.             UINT            wErrorRet;      // place for error to be returned
  644.             HTASK           htask;          // alternate local task
  645.  
  646.             // fields maintained by MMIO functions during buffered I/O
  647.             LONG            cchBuffer;      // size of I/O buffer (or 0L)
  648.             HPSTR           pchBuffer;      // start of I/O buffer (or NULL)
  649.             HPSTR           pchNext;        // pointer to next byte to read/write
  650.             HPSTR           pchEndRead;     // pointer to last valid byte to read
  651.             HPSTR           pchEndWrite;    // pointer to last byte to write
  652.             LONG            lBufOffset;     // disk offset of start of buffer
  653.  
  654.             // fields maintained by I/O procedure
  655.             LONG            lDiskOffset;    // disk offset of next read or write
  656.             DWORD           adwInfo[3];     // data specific to type of MMIOPROC
  657.  
  658.             // other fields maintained by MMIO
  659.             DWORD           dwReserved1;    // reserved for MMIO use
  660.             DWORD           dwReserved2;    // reserved for MMIO use
  661.             HMMIO           hmmio;          // handle to open file
  662.     } MMIOINFO;
  663.     typedef MMIOINFO       *PMMIOINFO;
  664.     typedef MMIOINFO NEAR *NPMMIOINFO;
  665.     typedef MMIOINFO FAR  *LPMMIOINFO;
  666.  
  667.     // RIFF chunk information data structure
  668.     typedef struct _MMCKINFO
  669.     {
  670.             FOURCC          ckid;           // chunk ID
  671.             DWORD           cksize;         // chunk size
  672.             FOURCC          fccType;        // form type or list type
  673.             DWORD           dwDataOffset;   // offset of data portion of chunk
  674.             DWORD           dwFlags;        // flags used by MMIO functions
  675.     } MMCKINFO;
  676.     typedef MMCKINFO       *PMMCKINFO;
  677.     typedef MMCKINFO NEAR *NPMMCKINFO;
  678.     typedef MMCKINFO FAR  *LPMMCKINFO;
  679.  
  680.     // bit field masks
  681.     //define MMIO_RWMODE    0x00000003      // open file for reading/writing/both
  682.     //define MMIO_SHAREMODE 0x00000070      // file sharing mode number
  683.  
  684.     // constants for dwFlags field of MMIOINFO
  685.     //define MMIO_CREATE    0x00001000      // create new file (or truncate file)
  686.     //define MMIO_PARSE     0x00000100      // parse new file returning path
  687.     //define MMIO_DELETE    0x00000200      // create new file (or truncate file)
  688.     //define MMIO_EXIST     0x00004000      // checks for existence of file
  689.     //define MMIO_ALLOCBUF  0x00010000      // mmioOpen() should allocate a buffer
  690.     //define MMIO_GETTEMP   0x00020000      // mmioOpen() should retrieve temp name
  691.  
  692.     //define MMIO_DIRTY     0x10000000      // I/O buffer is dirty
  693.  
  694.  
  695.     // read/write mode numbers (bit field MMIO_RWMODE)
  696.     //define MMIO_READ      0x00000000      // open file for reading only
  697.     //define MMIO_WRITE     0x00000001      // open file for writing only
  698.     //define MMIO_READWRITE 0x00000002      // open file for reading and writing
  699.  
  700.     // share mode numbers (bit field MMIO_SHAREMODE)
  701.     //define MMIO_COMPAT    0x00000000      // compatibility mode
  702.     //define MMIO_EXCLUSIVE 0x00000010      // exclusive-access mode
  703.     //define MMIO_DENYWRITE 0x00000020      // deny writing to other processes
  704.     //define MMIO_DENYREAD  0x00000030      // deny reading to other processes
  705.     //define MMIO_DENYNONE  0x00000040      // deny nothing to other processes
  706.  
  707.     // various MMIO flags
  708.     //define MMIO_FHOPEN            0x0010  // mmioClose: keep file handle open
  709.     //define MMIO_EMPTYBUF          0x0010  // mmioFlush: empty the I/O buffer
  710.     //define MMIO_TOUPPER           0x0010  // mmioStringToFOURCC: to u-case
  711.     //define MMIO_INSTALLPROC   0x00010000  // mmioInstallIOProc: install MMIOProc
  712.     //define MMIO_GLOBALPROC    0x10000000  // mmioInstallIOProc: install globally
  713.     //define MMIO_REMOVEPROC    0x00020000  // mmioInstallIOProc: remove MMIOProc
  714.     //define MMIO_FINDPROC      0x00040000  // mmioInstallIOProc: find an MMIOProc
  715.     //define MMIO_FINDCHUNK         0x0010  // mmioDescend: find a chunk by ID
  716.     //define MMIO_FINDRIFF          0x0020  // mmioDescend: find a LIST chunk
  717.     //define MMIO_FINDLIST          0x0040  // mmioDescend: find a RIFF chunk
  718.     //define MMIO_CREATERIFF        0x0020  // mmioCreateChunk: make a LIST chunk
  719.     //define MMIO_CREATELIST        0x0040  // mmioCreateChunk: make a RIFF chunk
  720.  
  721.  
  722.     // message numbers for MMIOPROC I/O procedure functions
  723.     //define MMIOM_READ     MMIO_READ       // read
  724.     //define MMIOM_WRITE    MMIO_WRITE      // write
  725.     //define MMIOM_SEEK             2       // seek to a new position in file
  726.     //define MMIOM_OPEN             3       // open file
  727.     //define MMIOM_CLOSE            4       // close file
  728.     //define MMIOM_WRITEFLUSH       5       // write and flush
  729.  
  730.     //define MMIOM_RENAME           6       // rename specified file
  731.  
  732.     //define MMIOM_USER        0x8000       // beginning of user-defined messages
  733.  
  734.     // standard four character codes
  735.     //define FOURCC_RIFF    mmioFOURCC('R', 'I', 'F', 'F')
  736.     //define FOURCC_LIST    mmioFOURCC('L', 'I', 'S', 'T')
  737.  
  738.     // four character codes used to identify standard built-in I/O procedures
  739.     //define FOURCC_DOS     mmioFOURCC('D', 'O', 'S', ' ')
  740.     //define FOURCC_MEM     mmioFOURCC('M', 'E', 'M', ' ')
  741.  
  742.     // flags for mmioSeek()
  743.  
  744.     // other constants
  745.     //define MMIO_DEFAULTBUFFER     8192    // default buffer size
  746.  
  747.     // MMIO macros
  748.     //define mmioFOURCC( ch0, ch1, ch2, ch3 )                               \
  749.                     ( (DWORD)(BYTE)(ch0) | ( (DWORD)(BYTE)(ch1) << 8 ) |    \
  750.                     ( (DWORD)(BYTE)(ch2) << 16 ) | ( (DWORD)(BYTE)(ch3) << 24 ) )
  751.  
  752.     // MMIO function prototypes
  753.     FOURCC WINAPI mmioStringToFOURCC(LPCSTR sz, UINT uFlags);
  754.     LPMMIOPROC WINAPI mmioInstallIOProc(FOURCC fccIOProc, LPMMIOPROC pIOProc,
  755.         DWORD dwFlags);
  756.     HMMIO WINAPI mmioOpen(LPSTR szFileName, MMIOINFO FAR* lpmmioinfo,
  757.         DWORD dwOpenFlags);
  758.  
  759.     UINT WINAPI mmioRename(LPCSTR szFileName, LPCSTR szNewFileName,
  760.          MMIOINFO FAR* lpmmioinfo, DWORD dwRenameFlags);
  761.  
  762.     UINT WINAPI mmioClose(HMMIO hmmio, UINT uFlags);
  763.     LONG WINAPI mmioRead(HMMIO hmmio, HPSTR pch, LONG cch);
  764.     LONG WINAPI mmioWrite(HMMIO hmmio, const char _huge* pch, LONG cch);
  765.     LONG WINAPI mmioSeek(HMMIO hmmio, LONG lOffset, int iOrigin);
  766.     UINT WINAPI mmioGetInfo(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
  767.     UINT WINAPI mmioSetInfo(HMMIO hmmio, const MMIOINFO FAR* lpmmioinfo, UINT uFlags);
  768.     UINT WINAPI mmioSetBuffer(HMMIO hmmio, LPSTR pchBuffer, LONG cchBuffer,
  769.         UINT uFlags);
  770.     UINT WINAPI mmioFlush(HMMIO hmmio, UINT uFlags);
  771.     UINT WINAPI mmioAdvance(HMMIO hmmio, MMIOINFO FAR* lpmmioinfo, UINT uFlags);
  772.     LRESULT WINAPI mmioSendMessage(HMMIO hmmio, UINT uMessage,
  773.         LPARAM lParam1, LPARAM lParam2);
  774.     UINT WINAPI mmioDescend(HMMIO hmmio, MMCKINFO FAR* lpck,
  775.         const MMCKINFO FAR* lpckParent, UINT uFlags);
  776.     UINT WINAPI mmioAscend(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
  777.     UINT WINAPI mmioCreateChunk(HMMIO hmmio, MMCKINFO FAR* lpck, UINT uFlags);
  778.     */
  779.  
  780.     // ****** Omit All MCI support *******
  781.  
  782.     // ****** DISPLAY Driver extensions ******
  783.  
  784.     /*
  785.         //define QUERYROPSUPPORT 40         // use to determine ROP support
  786.     */
  787.  
  788.     // ****** DIB Driver extensions ********
  789.  
  790.     //define SELECTDIB      41                      // DIB.DRV select dib escape
  791.     //define DIBINDEX(n)    MAKELONG((n),0x10FF)
  792.  
  793.  
  794.     // ****** ScreenSaver support *******
  795.  
  796.     // The current application will receive a syscommand of SC_SCREENSAVE just
  797.     // before the screen saver is invoked.  If the app wishes to prevent a
  798.     // screen save, return non-zero value, otherwise call DefWindowProc().
  799.  
  800.         //define SC_SCREENSAVE  0xF140
  801. }
  802.